package com.huawei.fakedouyin.data;

import com.huawei.fakedouyin.danmu.TextBean;

import java.util.Objects;

public class DmItem {

    private String cmd;
    private String msgId;
    private String videoId;

    private String userAccount;
    private String msg;
    private String position;
    private String color;
    private int fontSize = 0;
    private String sendTime;
    private int videoTime;
    private String tag;

    private boolean add = false;

    private int level = 0;

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getFontSize() {
        return fontSize;
    }

    public void setFontSize(int fontSize) {
        this.fontSize = fontSize;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public int getVideoTime() {
        return videoTime;
    }

    public void setVideoTime(int videoTime) {
        this.videoTime = videoTime;
    }

    public String getCmd() {
        return cmd;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getTag() {
        return tag;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getLevel() {
        return level;
    }

    public boolean isAdd() {
        return add;
    }

    public void setAdd(boolean add) {
        this.add = add;
    }

    public DmItem() {

    }

    public DmItem(String msgId, String videoId, String userAccount, String msg, String position, String color, int fontSize, String sendTime, int videoTime) {
        this.msgId = msgId;
        this.videoId = videoId;
        this.userAccount = userAccount;
        this.msg = msg;
        this.position = position;
        this.color = color;
        this.fontSize = fontSize;
        this.sendTime = sendTime;
        this.videoTime = videoTime;
    }
    //判断判断两个对象是否相等，对象是否存在，对象的tag是否相等
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DmItem bean = (DmItem) o;
        return Objects.equals(msgId, bean.msgId);
    }

    //返回对象的tag hash值
    @Override
    public int hashCode() {
        return Objects.hash(msgId);
    }


    @Override
    public String toString() {
        return "DmItem{" +
                "cmd='" + cmd + '\'' +
                ", msgId='" + msgId + '\'' +
                ", videoId='" + videoId + '\'' +
                ", userAccount='" + userAccount + '\'' +
                ", msg='" + msg + '\'' +
                ", position='" + position + '\'' +
                ", color='" + color + '\'' +
                ", fontSize=" + fontSize +
                ", sendTime='" + sendTime + '\'' +
                ", videoTime=" + videoTime +
                ", tag='" + tag + '\'' +
                ", level=" + level +
                '}';
    }
}
